import {
	defineConfig
} from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import {
	uniuseAutoImports
} from '@uni-helper/uni-use';
import path from 'path'
// ---- 导入插件 ----
import AutoImport from 'unplugin-auto-import/vite'

// https://vitejs.dev/config/
export default defineConfig({
	build: {
		target: 'es6',
		cssTarget: 'chrome61', // https://cn.vitejs.dev/config/build-options.html#build-csstarget
	},
	optimizeDeps: {
		// exclude: ['vue-demi'],
	},
	plugins: [
		uni(),
		// ---- 配置自动引入 ----
		AutoImport({
			imports: ['vue', 'uni-app', uniuseAutoImports()]
		})
	],
})